﻿@model CMS.UI.Models.FormModel

<div class="sectionHeader" data-bind="text: sectionHeader"></div>
<div class="sectionWindow">
    <div class="btnToggleSection">Form Details +</div>
    <form id="DetailsForm" action="#" class="sectionContent" method="post" data-bind="submit: onSubmit">
        <div>
            @Html.LabelFor(m => m.DomainID, "Domain")
            @Html.DropDownListFor(m => m.DomainID, ViewBag.Domains as SelectList, new { @class = "short", id = "ddlDomain" })
            @Html.HiddenFor(m => m.FormID)
        </div>
        <div>
            @Html.LabelFor(m => m.Name, "Form Title")
            @Html.TextBoxFor(m => m.Name, new { @class = "short", id = "tbTitle", maxlength = "50" })
            @Html.ValidationMessageFor(m => m.Name)
        </div>
        <div>
            @Html.LabelFor(m => m.Description, "Description")
            @Html.TextAreaFor(m => m.Description, new { @class = "long", id = "tbDesc", maxlength = "250" })
        </div>
        <div class="btnContainer">
            <button type="submit" id="btnNewForm" name="NewForm" class="btnGreen" data-bind="visible: !isEdit()">Add form</button>
            <button type="submit" id="btnSaveForm" name="SaveForm" class="btnGreen" data-bind="visible: isEdit">Update form</button>
            <button type="button" id="btnCancel" name="Cancel" class="btnRed" data-bind="click: onNewForm">Cancel</button>
        </div>
    </form>
</div>